Previous topicNext topic
Help > Keyword Reference >
XOR operator

Purpose

The XOR operator works as both a logical and a bitwise arithmetic operator.

Syntax

p XOR q

Remarks

XOR as a logical operator

XOR returns FALSE (zero) if and only if both its operands have the same value. Here is XOR's truth table:

 

Truth table

x

y

x XOR y

T

T

F

T

F

T

F

T

T

F

F

F

 

See also

Arithmetic Operators, AND, EQV, IMP, NOT, OR